import { BaseEntity } from '../../base/entity/base';
import { Column, Entity, Index } from 'typeorm';

/**
 * 用户档案信息
 */
@Entity('userprofile_profile')
export class UserProfileProfileEntity extends BaseEntity {
  @Index()
  @Column({ comment: '用户ID' })
  userId: number;

  @Column({ comment: '姓名', nullable: true })
  name: string;

  @Column({ comment: '性别', dict: ['未知', '男', '女'], default: 0 })
  gender: number;

  @Column({ comment: '出生日期', type: 'date', nullable: true })
  birthDate: Date;

  @Index()
  @Column({ comment: '联系方式', nullable: true })
  contact: string;

  @Column({ comment: '近视情况', type: 'simple-array', nullable: true })
  myopiaCondition: string;

  @Column({ comment: '视功能情况', type: 'simple-array', nullable: true })
  visualFunction: string;

  @Column({ comment: '散光情况', type: 'simple-array', nullable: true })
  astigmatism: string;

  @Column({ comment: '初步近视风险评估', type: 'simple-array', nullable: true })
  myopiaRisk: string;

  @Column({ comment: '初步近视风险原因', type: 'simple-array', nullable: true })
  myopiaRiskReason: string;

  @Column({ comment: '用户需求', type: 'simple-array', nullable: true })
  customerNeeds: string;

  @Column({ comment: '用户认知', type: 'simple-array', nullable: true })
  customerAwareness: string;

  @Column({ comment: '前期成交意向', nullable: true })
  dealIntention: string;

  @Column({ comment: '生活习惯', type: 'simple-array', nullable: true })
  lifeHabits: string;

  @Column({ comment: '既往干预史', type: 'simple-array', nullable: true })
  interventionHistory: string;

  @Column({ comment: '决策者身份', type: 'simple-array', nullable: true })
  decisionMaker: string;

  @Column({ comment: '竞争品牌使用', type: 'simple-array', nullable: true })
  competitorUsage: string;

  @Column({ comment: '转化策略', nullable: true })
  convertPlan: string;

  @Column({ comment: '备注', nullable: true })
  remark: string;
}
